fix: improve log clarity for stateless mode session termination#2332
Conversation
In stateless HTTP mode, every request logs 'INFO: Terminating session: None'. This is correct behavior but confusing to users who assume their connection is failing. Changes: - Downgrade stateless cleanup to DEBUG (routine, not noteworthy) - Use clearer wording: 'Stateless request completed, cleaning up transport' - Keep existing INFO-level log for actual session terminations Fixes modelcontextprotocol#2329
|
Nice fix! The differentiation between session-based (INFO) and stateless (DEBUG) terminations makes the logs much clearer for users. The code change is clean and minimal. One minor thought: could the stateless debug message include any request context (like a request ID if available) for debugging purposes? Not blocking — just wondering if it would help with troubleshooting. LGTM as-is. |
|
@owendevereaux Thanks for the feedback! Adding request context to the debug message is a good idea for troubleshooting. I'll consider that for a follow-up PR if there's demand. Glad the fix helps clarify the logs! |
|
Thanks for the PR! The linked issue (#2329) hasn't been triaged yet — per our CONTRIBUTING.md, please wait for maintainer feedback before starting work. Closing for now; feel free to reopen once the issue is labeled |
Summary
In stateless HTTP mode, every request logs
INFO: Terminating session: None.This is correct behavior but confusing to users who assume their connection
is failing or being dropped.
Changes
Fixes #2329